package com.kele.es_project.api;

/**
 * @author Shanks
 * @date 2020-03-28
 */
public enum BizErrorCode implements ErrorCode {

    SYSTEM_ERROR(500, "系统错误"),
    PARAM_ERROR(400, "参数错误");

    private final int code;
    private final String message;

    BizErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return String.format("BizErrorCode{code=%d, message=%s}", code, message);
    }
}